<include file="public@header" />
</head>
<div class="container" style="margin-top: 10px">
    <form action="" method="post" id="formId">
        <input type="hidden" name="user_id" value="{$user_id}">
        <div class="form-group">
            <select name="type_id" class="form-control">
                <volist name="update_money" id="vo">
                    <option value="{$vo.val}">{$vo.name}</option>
                </volist>
            </select>
        </div>
        <div class="form-group">
            <input type="text" class="form-control" name="money" value="" placeholder="请输入金额" >
            <p style="opacity: .6">加钱输入（10.00） 减钱输入（-10.00）</p>
        </div>
        <div class="form-group">

            <textarea name="ramakr" id="" class="form-control" placeholder="备注"></textarea>
        </div>
        <div class="text-center form-group">
            <button class="btn  btn-success">提交</button>
        </div>
    </form>
</div>
<body>
</body>
<script src="__STATIC__/js/layer/layer.js"></script>
<script>
    (function ($) {
        $(function () {
            $('#formId').submit(function () {
                $.post('{:cmf_url("admin/user/updatemoney")}',$(this).serialize(),function (da) {
                    if(da.code){
                        layer.msg(da.msg,{
                            end:function () {
                                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(index); //再执行关闭
                            }
                        });

                    }else{
                        layer.alert(da.msg)
                    }
                });
                return false;
            });
        })
    })($)
</script>